package com.econ.powercloud.ems.domain;

import com.econ.powercloud.common.base.facade.util.JacksonUtil;
import com.econ.powercloud.ems.common.enums.OSSPathType;
import com.econ.powercloud.ems.constant.SysConstant;
import com.econ.powercloud.ems.dal.entity.EmsEnergyEquipment;
import com.econ.powercloud.ems.pojo.EmsEnergyEquipmentVO;
import org.apache.commons.lang.StringUtils;

import java.util.List;

/**
 * @Author : zjf
 * @Description :
 * @Date : 2021/8/2 9:37
 * @Modified by : zjf
 */
public class EmsEnergyEquipmentDO {
    /**
     * 集合：实体类->VO类
     * @param emsEnergyEquipments
     * @return
     */
    public static List<EmsEnergyEquipmentVO> entityListToVOList(List<EmsEnergyEquipment> emsEnergyEquipments){
        List<EmsEnergyEquipmentVO> energyEquipmentVOS = JacksonUtil.convertToList(emsEnergyEquipments, EmsEnergyEquipmentVO.class);
        return energyEquipmentVOS;
    }

    /**
     * 实体类->VO类
     * @param emsEnergyEquipment
     */
    public static EmsEnergyEquipmentVO entityToVO(EmsEnergyEquipment emsEnergyEquipment){
        EmsEnergyEquipmentVO energyEquipmentVO = JacksonUtil.convertToObj(emsEnergyEquipment, EmsEnergyEquipmentVO.class);
        return energyEquipmentVO;
    }
}
